/*
 * Parameter.java
 * 
 * last update: 16.01.2010 by Stefan Saru
 * 
 * author:	Alec(panovici@elcom.pub.ro)
 * 
 * Obs:
 */

/** 
 * Holds the computed value of a parameter.
 * This value is determind at instantiation time of module 
 * (@see ParameterDescription), so after any <code>defparam</code>'s are 
 * completed.
 * @author Alec
 * @version 1.0alpha
 * 
 */ 

package engine;

class Parameter extends Expression{
	/**
	 *  The type of data depends on the initlization expression.
	 */
	Result data;

	ParameterDescription desc; 

	NameSpace ns;

	public Parameter(NameSpace ns, ParameterDescription desc, Result data)
	{
		super(ns);
		this.data = data;
		this.desc = desc;
	}

	public Result evaluate(){
		return data.duplicate();
	}

	public String toString(){
		return desc.toString();
	}

	void attrib(int from, int to, BitVector b, int start, int end){
		throw new Error("\nillegal parameter change ( \"" + desc + "\" )");
	}

	void addMonitor(Monitor m){} 

}





